package com.ruoyi.system.service.impl;


import com.ruoyi.system.service.ISnowflakeService;
import org.springframework.stereotype.Service;
import xyz.downgoon.snowflake.Snowflake;

/**
 * 雪花ID实现
 * @author cc
 * @version 1.0
 * */
@Service
public class SnowflakeServiceImpl implements ISnowflakeService {
    private static final Snowflake snowflake =
            new Snowflake(1, 1);
    @Override
    public Long getSnowflakeId() {
        return snowflake.nextId();
    }
}
